{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ test.title }}</title>
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="{% static 'main/css/tests.css' %}" />
</head>
<body>
    <div class="container">
        <h1>{{ test.title }}</h1>
        <p>{{ test.description }}</p>
        <p>Дата завершения: {{ test.due_date }}</p>
        <h2>Задания</h2>
        <ul>
            {% for task in test.tasks.all %}
                <li>
                    <h3>{{ task.title }}</h3>
                    <p>{{ task.description }}</p>
                    {% if task.image %}
                        <img src="{{ task.image.url }}" alt="Task image">
                    {% endif %}
                </li>
            {% endfor %}
        </ul>
    </div>
</body>
</html>
